home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 49
/
Amiga Format CD49 (2000-01-17)(Future Publishing)(GB)(Track 1 of 3)[!][issue 2000-02].iso
/
-websites-
/
wirenet
/
files
/
thor26_inet.lha
/
rexx
/
JoinNewGroup.thor
< prev
next >
Wrap
Text File
|
1999-01-17
|
2KB
|
61 lines
/*
$VER: JoinNewGroup.thor 1.1 (21.06.96)
(c) Neil Bothwick <neil@wirenet.co.uk> 1996
*/
/* Presents the contents of a NewGroups message in a */
/* listview and creates join events for those selected */
options results
/* needs THOR and bbsread.library functions */
thorport = address()
if left(thorport,5) ~= 'THOR.' then do
say 'No THOR port found. This script must be run from Thor.'
exit 10
end
if ~show('p', 'BBSREAD') then do
address command
'run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead'
'WaitForPort BBSREAD'
end
address(thorport)
drop MSG.
CURRENTMSG stem MSG /* Get info on current message */
if rc ~= 0 then ExitMsg(THOR.LASTERROR)
if upper(MSG.CONFNAME) ~= 'INFORMATION' then ExitMsg('This script only works from the Information conference')
address(bbsread) /* Read list of new newsgroups */
drop TEXT.
READBRMESSAGE bbsname '"'MSG.BBSNAME'"' confname '"'MSG.CONFNAME'"' msgnr MSG.MSGNR textstem TEXT
address(thorport)
drop PICKED.
REQUESTLIST instem TEXT.TEXT outstem PICKED /* Show new groups in a listview */
if RC = 5 then ExitMsg('No newsgroup selected')
if RC > 0 then ExitMsg(THOR.LASTERROR)
NewGroup = RESULT
address(bbsread)
drop NEWEVENT. /* Create join event */
NEWEVENT.CONFERENCE = NewGroup
WRITEBREVENT bbsname '"'MSG.BBSNAME'"' event 2 stem NEWEVENT
if rc ~= 0 then ExitMsg(BBSREAD.LASTERROR)
address(thorport)
REQUESTNOTIFY '"'NewGroup' joined"' '"OK"'
exit
ExitMsg:
address(thorport)
parse arg errmsg
REQUESTNOTIFY '"'errmsg'"' '" OK "'
exit